﻿using MapMaker.Engine.CoreCommon;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapMaker.Engine.Model.VXAce
{
    public class RPG_Troop
    {
        [RubyProperty("id")]
        public int ID { get; set; }

        [RubyProperty("name")]
        public string Name { get; set; }

        [RubyProperty("members")]
        public List<RPG_Member> Members { get; set; }

        [RubyProperty("pages")]
        public List<RPG_Page> Pages { get; set; }

        public class RPG_Member
        {
            [RubyProperty("enemy_id")]
            public int EnemyID { get; set; }

            [RubyProperty("x")]
            public int X { get; set; }

            [RubyProperty("y")]
            public int Y { get; set; }

            [RubyProperty("hidden")]
            public bool Hidden { get; set; }
        }
        public class RPG_Page
        {
            [RubyProperty("condition")]
            public RPG_Condition Condition { get; set; }

            [RubyProperty("span")]
            public int Span { get; set; }

            [RubyProperty("list")]
            public List<RPG_EventCommand> List { get; set; }

            public class RPG_Condition
            {
                [RubyProperty("turn_ending")]
                public bool TurnEnding { get; set; }

                [RubyProperty("turn_valid")]
                public bool TurnValid { get; set; }

                [RubyProperty("enemy_valid")]
                public bool EnemyValid { get; set; }

                [RubyProperty("actor_valid")]
                public bool ActorValid { get; set; }

                [RubyProperty("switch_valid")]
                public bool SwitchValid { get; set; }

                [RubyProperty("turn_a")]
                public int TurnA { get; set; }

                [RubyProperty("turn_b")]
                public int TurnB { get; set; }

                [RubyProperty("enemy_index")]
                public int EnemyIndex { get; set; }

                [RubyProperty("enemy_hp")]
                public int EnemyHP { get; set; }

                [RubyProperty("actor_id")]
                public int ActorID { get; set; }

                [RubyProperty("actor_hp")]
                public int ActorHP { get; set; }

                [RubyProperty("switch_id")]
                public int SwitchID { get; set; }
            }
        }

        internal static IEnumerable<dynamic> Export(IObjectManager factory, IEnumerable list)
        {
            throw new NotImplementedException();
        }

    }
}
